package com.omnisyr.paperanalyser.common;

public class Paper {

	private String doi;
	private String name;
	private String time;
	private String url;

	public Paper(String[] strs) {

		this.doi = strs[0];
		this.name = strs[1];
		this.time = strs[7];

		int index = -1;
		for (String id : strs[0].split(" ")) {

			index = id.indexOf("doi");

			if (index < 0) {

				continue;

			}

			this.doi = id.substring(4);

		}

		this.url = "https://sci-hub.se/" + this.doi;

	}

	public String getDOI() {

		return this.doi;

	}

	public String toString() {

		return this.time + ":" + this.name + "(" + this.doi + ")";

	}

	public String getTitle() {

		return this.name;

	}

	public String getURL() {

		return this.url;

	}

}
